home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / DClap / Dvibrant.h < prev    next >
Text File  |  1996-07-05  |  4KB  |  161 lines

  1. /* Dvibrant.h
  2.      see the NCBI Tools vibrant/ section headers for description of routines and usage.
  3.      modified for use w/ DCLAP library, dgg
  4. */
  5.  
  6.  
  7. #ifndef _VIBRANT_
  8. #define _VIBRANT_
  9.  
  10. #include <dgg.h>
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. /*
  17. *  Familiarity with the NCBI core tools, and the platform concept,
  18. *  are assumed.
  19. */
  20.  
  21.  
  22. #ifndef _VIBTYPES_
  23. #include <vibtypes.h>
  24. #endif
  25.  
  26. #ifndef _VIBPROCS_
  27. #include <vibprocs.h>
  28.  
  29. /* this is from <ncbiport.h> -- Nlm_fontrec definition, renamed to Dgg_fontrec to avoid clashes w/ real one*/
  30. /* The font structure is created using a handle.  The FntPtr is
  31. *  returned by a call to Nlm_HandLock (font).  Be sure to call
  32. *  Nlm_HandUnlock (font) after obtaining the font handle.
  33. */
  34.  
  35. typedef  struct  Dgg_fontrec {
  36.   Nlm_FonT      next;
  37.   Nlm_Char      name [32];
  38.   Nlm_Int2      size;
  39.   Nlm_Int2      scale;
  40.   Nlm_Boolean   bld;
  41.   Nlm_Boolean   ital;
  42.   Nlm_Boolean   undlin;
  43.   Nlm_Int2      number;
  44.   Nlm_Int2      style;
  45.   Nlm_Handle    handle;
  46.   Nlm_FonT      print;
  47. } Dgg_FontRec, Dgg_FontData, PNTR Dgg_FntPtr;
  48.  
  49.  
  50.     /* some additional methods from vibrant needed by DCLAP */
  51. extern void Nlm_GetChoiceTitle  PROTO((Nlm_GraphiC c, Nlm_Int2 item,
  52.                                 Nlm_CharPtr title, Nlm_sizeT maxsize));
  53.  
  54. extern void Nlm_SetDialogTextFont PROTO((Nlm_FonT theFont));
  55.  
  56. extern void Nlm_SelectBackColor PROTO((Nlm_Uint1 red, Nlm_Uint1 green, Nlm_Uint1 blue));
  57. extern void Nlm_TextOpaque PROTO(());
  58. extern void Nlm_TextTransparent PROTO(());
  59. extern void Nlm_PenPattern PROTO((void *pat));
  60. extern Nlm_FonT  Nlm_fontInUse;
  61.  
  62. /* extern Nlm_Boolean Nlm_SetSlateBorder PROTO((Nlm_SlatE s, Boolean turnon)); */
  63.  
  64.     /* from vibincld.h */
  65. extern Nlm_GphPrcsPtr Nlm_GetClassPtr PROTO((Nlm_GraphiC a));
  66. extern void Nlm_SetRect PROTO((Nlm_GraphiC a, Nlm_RectPtr r));
  67.  
  68. extern Nlm_Handle Nlm_Parent PROTO((Nlm_Handle a));
  69. extern void Nlm_SetChild PROTO((Nlm_GraphiC a, Nlm_GraphiC chld));
  70. extern Nlm_GraphiC Nlm_GetChild PROTO((Nlm_GraphiC a));
  71. extern void Nlm_SetParent  PROTO((Nlm_GraphiC a, Nlm_GraphiC prnt));
  72.  
  73. #endif  /* _VIBPROCS_ */
  74.  
  75.  
  76.         /* multiline text -- Nlm_DrawText only handles one line */
  77. extern void Dgg_DrawTextbox  PROTO((Nlm_RectPtr r, Nlm_CharPtr text,
  78.                                ulong len, Nlm_Char jst, Nlm_Boolean gray));
  79.  
  80. extern void Dgg_PenNormal PROTO(()); /* nlmdraw addition */
  81.  
  82.             /* draw Mac PICT data */
  83. extern void Dgg_DrawPICTure  PROTO((Nlm_RectPtr r, Nlm_VoidPtr pict));
  84. extern Nlm_VoidPtr Dgg_IsPICT PROTO(( Nlm_VoidPtr pictdata, ulong datasize,
  85.                                                                      Nlm_Boolean dontTestForHeader));
  86.  
  87. extern void Dgg_SetParentWindow PROTO((Nlm_GraphiC a, Nlm_WindoW newwindow));
  88.  
  89.         /* launch an app with a command line (mac,unix,vms,mswin) */
  90.         /* to launch document (mac) call w/ appName == docname and rest == NULL */
  91.     
  92. extern Nlm_Boolean Dgg_LaunchApp PROTO(( char* appName, char* commandline,
  93.                                                                                                                                     char* Stdin, char* Stdout, char* Stderr));
  94.  
  95. extern const char*  MacDirIDtoName PROTO(( short vRefNum, long dirID, char* fname));
  96. extern short HandleFileEvent PROTO(( long inEvent, long outReply, long inNumber,
  97.                                                                               long fileFunc));
  98.  
  99. /* dgg -- leave out vibdefns, which are just the Nlm_ less #defines
  100. #ifndef _VIBDEFNS_
  101. #include <vibdefns.h>
  102. #endif
  103. */
  104.  
  105.         /* vibrant's newer docpanel type */
  106. #ifndef _DOCUMENT_
  107. #include <document.h>
  108. #endif
  109.  
  110.     /* remove proc defs made in document.h */
  111. #undef DoC 
  112. #undef DocPrntProc 
  113. #undef DocClckProc 
  114. #undef DocDrawProc 
  115. #undef DocShadeProc 
  116. #undef DocDataProc 
  117. #undef DocPanProc 
  118. #undef DocFreeProc 
  119. #undef DocPutProc 
  120. #undef DocGetProc 
  121. #undef DocUpdProc 
  122. #undef ColPtr 
  123. #undef ColData 
  124. #undef ParData 
  125. #undef ParPtr 
  126. #undef DocumentPanel 
  127. #undef SetDocProcs 
  128. #undef SetDocShade 
  129. #undef SetDocCache 
  130. #undef SetDocData 
  131. #undef GetDocData 
  132. #undef GetDocText 
  133. #undef MapDocPoint 
  134. #undef PrintDocument 
  135. #undef SaveDocument 
  136. #undef GetDocParams 
  137. #undef GetItemParams 
  138. #undef GetColParams 
  139. #undef AppendItem 
  140. #undef AppendText 
  141. #undef ReplaceItem 
  142. #undef ReplaceText 
  143. #undef InsertItem 
  144. #undef InsertText 
  145. #undef DeleteItem 
  146. #undef ItemIsVisible 
  147. #undef GetScrlParams 
  148. #undef UpdateDocument 
  149. #undef AdjustDocScroll 
  150. #undef SetDocAutoAdjust 
  151. #undef DisplayFile 
  152. #undef DisplayFancy 
  153.  
  154. #undef SetDocTabstops  
  155.  
  156. #ifdef __cplusplus
  157. }
  158. #endif
  159.  
  160. #endif
  161.